package com.zyy.meetObject;

public class RecursionTest {
    public static void main(String[] args) {
        int num = 10;
        RecursionTest test = new RecursionTest();
        int ans = test.getNum(num);
        System.out.println(ans);
    }
    public int getNum(int num){
        if(num == 1){
            return 1;
        }else if(num == 2){
            return 2;
        }else{
            return getNum(num - 1) + getNum(num - 2);
        }

    }
}
